READLINK

Section: MINTLIB LIBRARY FUNCTIONS (3)
Updated: 3 March 1993
Index Return to Main Contents
 

NAME

readlink - read value of a symbolic link  

SYNOPSIS

   #include <support.h>

?? int readlink(const char *path, char *buf, int bufsiz); // Should be like this
   int readlink(char *path, char *buf, int bufsiz);
 

DESCRIPTION

readlink places the contents of the symbolic link referred to by path in the buffer buf which has size bufsiz. The buffer must be large enough to hold the string and the terminating null.  

RETURN VALUES

readlink returns the number of characters placed in the buffer, minus the terminating zero. On failure, it returns -1 and sets errno to indicate the error.  

SEE ALSO

lstat(3), symlink(3), Freadlink(2)  

NOTES

On UN*X, the contents of the buffer is not null-terminated; the size of the buffer as passed to the readlink call is therefore off by one when compared to the mintlibs. It is unlikely that this would ever be a problem. MS-DOS (TOS) file-systems do not support symbolic links.
 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
NOTES

This document was created by man2html, using the manual pages.
Time: 11:14:39 GMT, June 22, 2025